
import { sequelize } from '../../config/database';
import User from './User';
import Room from './Room';
import LiveSession from './LiveSession';
import Message from './Message';
import FanClub from './FanClub';
import UserRoomGift from './UserRoomGift';
import UserSnapshot from './UserSnapshot';
import Statistic from './Statistic';
import Gift from './Gift';

// 同步数据库模型
export async function syncModels() {
  try {
    await sequelize.sync({ force: false, alter: true });
    console.log('✅ 数据库模型同步成功');
  } catch (error) {
    console.error('❌ 数据库模型同步失败:', error);
    throw error;
  }
}

export {
  User,
  Room, 
  LiveSession,
  Message,
  FanClub,
  UserRoomGift,
  UserSnapshot,
  Statistic,
  Gift
};